//using System;
//using System.Runtime.CompilerServices;
//using System.Runtime.InteropServices;

//namespace Windows7.DesktopIntegration.Interop
//{
//    [ComImport, ClassInterface((short)0), Guid("d9b3211d-e57f-4426-aaef-30a806add397")]
//    internal class ShellLibraryClass : IShellLibrary
//    {
//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void LoadLibraryFromItem(
//                    [In, MarshalAs(UnmanagedType.Interface)] IShellItem library,
//                    [In] SafeNativeMethods.StorageInstantiationModes grfMode);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void LoadLibraryFromKnownFolder(
//                    [In] ref Guid knownfidLibrary,
//                    [In] SafeNativeMethods.StorageInstantiationModes grfMode);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void AddFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem location);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void RemoveFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem location);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetFolders(
//                    [In] SafeNativeMethods.LIBRARYFOLDERFILTER lff,
//                    [In] ref Guid riid,
//                    [MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppv);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void ResolveFolder(
//                    [In, MarshalAs(UnmanagedType.Interface)] IShellItem folderToResolve,
//                    [In] uint timeout,
//                    [In] ref Guid riid,
//                    [MarshalAs(UnmanagedType.Interface)] out IShellItem ppv);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetDefaultSaveFolder(
//                    [In] SafeNativeMethods.DEFAULTSAVEFOLDERTYPE dsft,
//                    [In] ref Guid riid,
//                    [MarshalAs(UnmanagedType.Interface)] out IShellItem ppv);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SetDefaultSaveFolder(
//                    [In] SafeNativeMethods.DEFAULTSAVEFOLDERTYPE dsft,
//                    [In, MarshalAs(UnmanagedType.Interface)] IShellItem si);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetOptions(
//                    out SafeNativeMethods.LIBRARYOPTIONFLAGS lofOptions);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SetOptions(
//                    [In] SafeNativeMethods.LIBRARYOPTIONFLAGS lofMask,
//                    [In] SafeNativeMethods.LIBRARYOPTIONFLAGS lofOptions);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetFolderType(out Guid ftid);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SetFolderType([In] ref Guid ftid);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetIcon([MarshalAs(UnmanagedType.LPWStr)] out string icon);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SetIcon([In, MarshalAs(UnmanagedType.LPWStr)] string icon);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void Commit();

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void Save(
//                    [In, MarshalAs(UnmanagedType.Interface)] IShellItem folderToSaveIn,
//                    [In, MarshalAs(UnmanagedType.LPWStr)] string libraryName,
//                    [In] SafeNativeMethods.LIBRARYSAVEFLAGS lsf,
//                    [MarshalAs(UnmanagedType.Interface)] out IShellItem savedTo);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SaveInKnownFolder(
//                    [In] ref Guid kfidToSaveIn,
//                    [In, MarshalAs(UnmanagedType.LPWStr)] string libraryName,
//                    [In] SafeNativeMethods.LIBRARYSAVEFLAGS lsf,
//                    [MarshalAs(UnmanagedType.Interface)] out IShellItem savedTo);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string libraryName);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetName([MarshalAs(UnmanagedType.LPWStr)] out string libraryName);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void SetAuthor([In, MarshalAs(UnmanagedType.LPWStr)] string authorName);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void GetAuthor([MarshalAs(UnmanagedType.LPWStr)] out string authorName);

//        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
//        public virtual extern void ShowManageLibraryUI(
//                    [In] IntPtr hwndOwner,
//                    [In, MarshalAs(UnmanagedType.LPWStr)] string title,
//                    [In, MarshalAs(UnmanagedType.LPWStr)] string instruction);

//    }
//}